<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>animation使用</title>
    <style type="text/css">
        div{
            width: 100px;
            height: 100px;
            background: red;
            /*调用动画*/
            animation: animates 3s linear infinite;
        }
        /*创建关键帧*/
        @keyframes animates {
            0%{
                width: 0px;
                transform: translate(50px, 0);
            }
            25%{
                width: 25px;
                height: 150px;
                transform: translate(150px,0) rotate(90deg);
                background-color: pink;
            }
            50%{
                width: 50px;
                height: 300px;
                background-color: aqua;
                transform: translate(300px,0) rotate(180deg);
            }
            75%{
                width: 75px;
                height: 150px;
                background-color: orange;
                transform: translate(150px,0) rotate(270deg);
            }
            100%{
                width: 100px;
                transform: translate(50px,0) rotate(360deg);
            }
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>